package com.xdb.sqlparser.ast;

import com.xdb.sqlparser.util.SQLUtils;
import com.xdb.sqlparser.visitor.SQLAstVisitor;
/**
 * 抽象的SQL语句实现
 * @author woate
 *
 */
public abstract class AbstractSQLStatementImpl extends AbstractSQLObjectImpl implements SQLStatement {
	/**
	 * 数据库类型
	 */
	private String dbType;

	public AbstractSQLStatementImpl() {

	}

	public AbstractSQLStatementImpl(String dbType) {
		this.dbType = dbType;
	}
	/**
	 * 数据库类型
	 * @return
	 */
	public String getDbType() {
		return dbType;
	}
	/**
	 * 数据库类型
	 * @param dbType
	 */
	public void setDbType(String dbType) {
		this.dbType = dbType;
	}

	public String toString() {
		return SQLUtils.toSQLString(this, dbType);
	}

	@Override
	protected void accept0(SQLAstVisitor visitor) {
		throw new UnsupportedOperationException(this.getClass().getName());
	}
}
